import QtQuick 2.0

Rectangle {
    id: simplebutton
    color: area.containsMouse ? 'red': 'gray'
    width: icon.width + 2*icon.anchors.leftMargin
    height: icon.height + 2*icon.anchors.topMargin


    property alias image: icon

    signal clicked()


     Image {
        id: icon

        anchors.left: simplebutton.left
        anchors.top: simplebutton.top
     }


    MouseArea {
        id: area
        anchors.fill: parent
        onClicked: simplebutton.clicked()
        hoverEnabled: true


            //console.log(buttonLabel.text + ' clicked')
        //Qt.quit();
    }
}
